package book;

public class BookList {
    public Book[] books = new Book[10];
    public int usedsize;
    public  BookList(){
        books[0] = new Book("三国演义","罗贯中",45,"小说");
        books[1] = new Book("红楼梦","曹雪芹",25,"小说");
        books[2] =new Book("西游记","吴承恩",38,"小说");
        this.usedsize = 3;
     }

    public int getUsedsize() {
        return usedsize;
    }

    public void setUsedsize(int usedsize) {
        this.usedsize = usedsize;

    }
    public Book getPos(int pos){
        return books[pos];
    }
    public void setBooks(Book book,int pos){
        books[pos] = book;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }


}
